﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 类的继承与多态;

namespace 类的继承与多态
{
    class Program
    {
        static void Main(string[] args)
        {
            book b = new book();
            //抽象类不能创建实例product p = new product();
            b.Name = "西游记";
            b.Price = 10.0M;
            b.Instro = "四大名著";
            b.Isba = "110";
            b.show();
            b.showdetil();
           
            
            digital d = new digital();
            d.Name = "蓝牙音响";
            d.Barcode = "120";
            d.Price = 350M; 
            action buy = new action();
            buy.Buy(b);
            buy.Buy(d);
            buy.show();

            Console.ReadKey();
        }
    }
}
